<html>
<head>
    <title>打印实心菱形</title>
    <style>
        body {
            background-image: url("../第八周/WOW.jpg");
        }
        div{
            width: 100px;
            height: 100px;
            margin: 0 auto;

        }
    </style>
</head>
<body>
<div>
    <?php
    for ($i = 1; $i <= 5; $i++) {
        for ($j = 4; $j >= $i; $j--) {
            echo "&nbsp;";
        }
        for ($j = 1; $j <= $i * 2 - 1; $j++) {
            echo "<span style='color: #00ee00'>*</span>";

        }

        echo "<br/>";
    }
    for ($i = 4; $i >= 1; $i--) {
        for ($j = 4; $j >= $i; $j--) {
            echo "<span>&nbsp;</span>";
        }
        for ($j = 1; $j <= $i * 2 - 1; $j++) {
            echo "<span style='color: #00ee00'>*</span>";
        }
        echo "<br/>";
    }

    ?>
</div>

</body>
</html>